<?php //$Rev:: 55         $ // DO NOT REMOVE

function leave_leaveChat(&$obj, $data)
{
    if ($obj->core->utilities->aim_is_admin($data['screenname'])) {
        if ($data['message_type'] == AIM_MSG_CHAT) {
            if (!$data['whisper']) {
                $obj->core->chat->aim_chat_send($data['cid'], "As you wish... :'(");
                $obj->core->chat->aim_chat_part($data['cid']);
            } else {
                // this is obsolete, so, we really don't worry about it being used
                $obj->core->chat->aim_chat_whisper($data['cid'], $data['screenname'], "Pssst, it's not polite to whisper");
            }
        }
    } else {
        $obj->core->utilities->aim_send_im($data['screenname'], 'You are not authorized to the requested command', true);
    }
}

function invite_inviteChat(&$obj, $data)
{
    if ($obj->core->utilities->aim_is_admin($data['screenname'])) {
        // ensure we only activate the callback if the !invite command is used in
        // a chat room, and not an instant message
        if ($data['message_type'] == AIM_MSG_CHAT) {
            $obj->core->chat->aim_chat_invite($data['cid'], $data['message_text']);
        }
    } else {
        $obj->core->utilities->aim_send_im($data['screenname'], 'You are not authorized to the requested command', true);
    }
}

?>